Improve reading of broken NMEA.
authorrobertlipe@gmail.com <robertlipe@gmail.com@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 4 Mar 2012 20:30:50 +0000 (20:30 +0000)
committerrobertlipe@gmail.com <robertlipe@gmail.com@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 4 Mar 2012 20:30:50 +0000 (20:30 +0000)
git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4156 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/nmea.c

index f0bc5119aee306d28c3ab80f0e49e0dc6e7c2ca4..98bc4e731e617853f359976e944affde7d474f7a 100644 (file)
@@ -397,6 +397,7 @@ gpgll_parse(char* ibuf)
   }
 
   hms = (int) hmsd;
+  last_read_time = hms;
   microseconds = MILLI_TO_MICRO(1000 * (hmsd - hms));
 
   tm.tm_sec = hms % 100;
@@ -405,8 +406,6 @@ gpgll_parse(char* ibuf)
   hms = hms / 100;
   tm.tm_hour = hms % 100;
 
-  last_read_time = hms;
-
   waypt = waypt_new();
 
   nmea_set_waypoint_time(waypt, &tm, microseconds);